<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>${userTypeDictItem.itemName}管理</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        $(document).ready(function () {
        });
    </script>
</head>
<body>
<ul class="nav nav-tabs">
    <li>
        <a href="${ctx}/sys/sysUser/wechatList">${userTypeDictItem.itemName}列表</a>
    </li>
    <li class="active">
        <a href="${ctx}/sys/sysUser/wechatForm">
            ${userTypeDictItem.itemName}<shiro:hasPermission name="sys:sysUser:edit">${not empty sysUser.id?'修改':'添加'}</shiro:hasPermission>
            <shiro:lacksPermission name="sys:sysUser:edit">查看 </shiro:lacksPermission>
        </a>
    </li>
</ul>
<br/>
<form:form id="inputForm" modelAttribute="sysUser" action="${ctx}/sys/sysUser/wechatSave" method="post" class="form-horizontal">
    <form:hidden path="id"/>
    <form:hidden path="userType" value="${userTypeDictItem.itemCode}"/>
    <sys:message content="${message}"/>
    <div class="control-group">
        <label class="control-label">头像:</label>
        <div class="controls">
            <img src="${sysUser.photo}" style="max-width:100px;max-height:100px;_height:100px;border:0;padding:2px;">
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">微信ID:</label>
        <div class="controls">
                ${sysUser.wechatOpenid}
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">昵称:</label>
        <div class="controls">
                ${sysUser.name}
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">是否允许登录:</label>
        <div class="controls">
            <form:select path="loginFlag">
                <form:options items="${fns:getDataDictItemList('yes_no')}" itemLabel="itemName" itemValue="itemCode" htmlEscape="false"/>
            </form:select>
            <span class="help-inline" style="color:red">*</span>
            <span class="help-inline">“是”代表此账号允许登录，“否”则表示此账号不允许登录</span>
        </div>
    </div>
    <div class="form-actions">
        <shiro:hasPermission name="sys:sysUser:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
        <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
    </div>
</form:form>
</body>
</html>